package com.xuelang.pipeline.artifact.infrastructure.resource.converter;

import com.xuelang.pipeline.artifact.domain.resource.RepositoryPackage;
import com.xuelang.pipeline.artifact.infrastructure.resource.dataobject.RepositoryPackageDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 制品仓库-包实体与制品仓库-包DO转换器类
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface RepositoryPackageToRepositoryPackageDOConverter {

    RepositoryPackageToRepositoryPackageDOConverter INSTANCE = Mappers.getMapper(RepositoryPackageToRepositoryPackageDOConverter.class);

    /**
     * RepositoryPackage转化为RepositoryPackageDO
     * @param repositoryPackage
     * @return
     */
    RepositoryPackageDO repositoryPackageToRepositoryPackageDO(RepositoryPackage repositoryPackage);

    /**
     * RepositoryPackageDO转化为RepositoryPackage
     * @param repositoryPackageDO
     * @return
     */
    RepositoryPackage repositoryPackageDOToRepositoryPackage(RepositoryPackageDO repositoryPackageDO);

}
